<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:awe="http://schemas.awesomium.com/winfx"
    xmlns:shell="clr-namespace:Microsoft.Windows.Shell;assembly=Microsoft.Windows.Shell"
    xmlns:local="clr-namespace:VBWPFSample">

    <!-- GlowTextBlock -->
    <Style TargetType="{x:Type local:GlowTextBlock}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type local:GlowTextBlock}">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            SnapsToDevicePixels="True">
                        <Grid>
                            <TextBlock
                                Text="{TemplateBinding Text}" 
                                Foreground="{TemplateBinding Foreground}"
                                FontFamily="{TemplateBinding FontFamily}"
                                FontSize="{TemplateBinding FontSize}"
                                FontStretch="{TemplateBinding FontStretch}"
                                FontStyle="{TemplateBinding FontStyle}"
                                FontWeight="{TemplateBinding FontWeight}"
                                TextTrimming="{TemplateBinding TextTrimming}"/>
                            <TextBlock 
                                x:Name="PART_Glow" 
                                Grid.ZIndex="-1" 
                                Foreground="White" 
                                Text="{TemplateBinding Text}" 
                                FontFamily="{TemplateBinding FontFamily}"
                                FontSize="{TemplateBinding FontSize}"
                                FontStretch="{TemplateBinding FontStretch}"
                                FontStyle="{TemplateBinding FontStyle}"
                                FontWeight="{TemplateBinding FontWeight}"
                                TextTrimming="{TemplateBinding TextTrimming}"
                                Visibility="{TemplateBinding GlowVisibility}">
                                <TextBlock.Effect>
                                    <BlurEffect />
                                </TextBlock.Effect>
                            </TextBlock>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <DataTrigger Binding="{Binding Path=IsGlassEnabled, Source={x:Static shell:SystemParameters2.Current}}" Value="True">
                <Setter Property="GlowVisibility" Value="Visible" />
            </DataTrigger>
        </Style.Triggers>
    </Style>
    
</ResourceDictionary>
